package com.giantlizard.cloud.auth.controller;

import com.giantlizard.cloud.auth.model.LoginDTO;
import com.giantlizard.cloud.auth.service.AuthService;
import com.giantlizard.cloud.base.generics.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/auth")
public class AuthController {
    
    @Autowired
    private AuthService authService;
    
    @PostMapping("/login")
    public R<?> login(@RequestBody LoginDTO loginDTO) {
        return authService.login(loginDTO);
    }
    
    @PostMapping("/logout")
    public R<?> logout() {
        return authService.logout();
    }
} 